﻿
@model IEnumerable<MVCBootStrapShell_WithTheme.Models.Person>

@{ Html.RenderPartial("_PersonSearchForm"); }

<div id="people-stat">
    <a href="#">Registration 
        <span class="badge">19</span>
        <span class="badge badge-danger">19</span>
        <span class="badge badge-success">19</span>
        <span class="badge badge-info">19</span>
        <span class="badge badge-inverse">19</span>
    </a>
</div>

<div id="people-data">
    @Html.DisplayForModel(Model)
</div> 

@section scripts
{
    <script type="text/javascript">
        $(function () {
            $("#search-btn").click(function () {
                var searchTerm = $("#search-text").val();
                $.get("SearchPeople", { searchText: searchTerm })
                    .success(function (data) {
                        $("#people-data").html(data);
                    });
            });
        });
    </script>
}